package com.whfc.fuum.dao;

import com.whfc.fuum.dto.SysExternalUserDTO;
import com.whfc.fuum.entity.SysExternalUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SysExternalUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysExternalUser record);

    int insertSelective(SysExternalUser record);

    SysExternalUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysExternalUser record);

    int updateByPrimaryKey(SysExternalUser record);

    /**
     * 查询第三方系统用户
     *
     * @param platform
     * @param userId
     * @return
     */
    SysExternalUserDTO selectByPlatformAndUserId(@Param("platform") String platform, @Param("userId") Integer userId);

    /**
     * 查询第三方平台授权信息
     * @param platform
     * @param deptId
     * @return
     */
    SysExternalUserDTO selectByPlatformAndDeptId(@Param("deptId") Integer deptId,@Param("platform") String platform);
}